package com.cjy.common.bean;

import java.util.ArrayList;

/**
 * 扩展ArrayList
 * @author: jay.zhoujingjie
 * Date: 13-12-19
 * Time: 下午2:50
 */
public class OpList<E> extends ArrayList<E>
{
    public OpList()
    {
        super();
    }

    public OpList(E e)
    {
        this.add(e);
    }

    /**
     * 删除一个对象
     * @param e
     * @return
     */
    public OpList<E> delete(E e)
    {
        this.remove(e);
        return this;
    }

    /**
     * 插入一个对象
     * @param e
     * @return
     */
    public OpList<E> insert(E e)
    {
        this.add(e);
        return this;
    }
}
